\[ p(\mathrm{hypothesis}|\mathrm{data}) = \frac{p(\mathrm{data}|\mathrm{hypothesis})p(\mathrm{hypothesis})}{p(\mathrm{data})} \]
\[ \mathrm{posterior} \propto \mathrm{data} * \mathrm{prior}\]
The goal is a distribution for a parameter (stable)…
rather than a single parameter estimate
Posterior distribution
A weighted combination of the prior and likelihood
Represents our intution regarding the intial state of affairs
Based on:
Prior belief
Prior research
Known approaches that work well in the modeling context
Which interpretation do you prefer?
If I asssume a value of zero for the parameter, what is the probability of my observed parameter or more extreme?
Or
What’s the probability my result is greater than zero?
Which interpretation do you prefer?
If I repeat this study precisely an infinite number of times, and I calculate a P% interval each time, then P% of those intervals will contain the true parameter. Here is one of those intervals.
Or
The probability the parameter falls in this interval is P.
Intuitive results
Auto-regularization
Intervals for anything you can calculate
(mpg ~ wt, data=mtcars)
(mpg ~ wt, data=mtcars)
(mpg ~ wt, data=mtcars)lm(mpg ~ wt, data=mtcars)
(mpg ~ wt, data=mtcars)
(mpg ~ wt, data=mtcars)lm(mpg ~ wt, data=mtcars)
stan_lm(mpg ~ wt, data=mtcars) # rstanarm
(mpg ~ wt, data=mtcars)lm(mpg ~ wt, data=mtcars)
stan_lm(mpg ~ wt, data=mtcars) # rstanarm
brm(mpg ~ wt, data=mtcars) # brmsglm(treat ~ educ + black + hisp + married, data=lalonde, family='binomial')
stan_glm(treat ~ educ + black + hisp + married, data=lalonde, family='binomial') # rstanarm
brm(treat ~ educ + black + hisp + married, data=lalonde, family='binomial') # brmsclm(rating ~ temp*contact, data = wine) # ordinal
stan_polr(rating ~ temp*contact, data = wine) # rstanarm
brm(rating ~ temp*contact, data = wine, family='ordinal') # brmslmer(Reaction ~ Days + (1 + Days|Subject)) # lme4
stan_lmer(Reaction ~ Days + (1 + Days|Subject)) # rstanarm
brm(Reaction ~ Days + (1 + Days|Subject)) # brms
Settings
Debugging
Diagnostics
Model comparison
Big data
Very complex models
Can you do any less?!